/* 甘特图基础样式 */
.gantt-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  font-family: Arial, sans-serif;
  --gantt-primary-color: #4e85c5;
  --gantt-secondary-color: #13c2c2; 
  --gantt-border-color: #d9d9d9;
  --gantt-background-color: #ffffff;
  --gantt-task-color: #4e85c5;
  --gantt-milestone-color: #722ed1;
  --gantt-project-color: #fa8c16;
  --gantt-dependency-line-color: #bfbfbf;
}

/* 头部样式 */
.gantt-header {
  position: sticky;
  top: 0;
  background-color: #f5f5f5;
  border-bottom: 1px solid var(--gantt-border-color);
  z-index: 2;
}

.gantt-timeline {
  display: flex;
  flex-direction: row;
  height: 40px;
  border-bottom: 1px solid var(--gantt-border-color);
}

.gantt-day {
  display: flex;
  justify-content: center;
  align-items: center;
  min-width: 40px;
  height: 100%;
  border-right: 1px solid var(--gantt-border-color);
  font-size: 12px;
  user-select: none;
}

/* 任务容器样式 */
.gantt-task-container {
  flex: 1;
  overflow: auto;
  position: relative;
  background-color: var(--gantt-background-color);
}

.gantt-task-row {
  display: flex;
  height: 40px;
  border-bottom: 1px solid var(--gantt-border-color);
}

.gantt-task-label {
  width: 200px;
  min-width: 200px;
  padding: 0 10px;
  display: flex;
  align-items: center;
  background-color: #fafafa;
  border-right: 1px solid var(--gantt-border-color);
  position: sticky;
  left: 0;
  z-index: 1;
}

.gantt-task-label-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
}

.gantt-task-bar {
  position: absolute;
  height: 24px;
  margin-top: 8px;
  border-radius: 4px;
  background-color: var(--gantt-task-color);
  cursor: pointer;
  z-index: 1;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.gantt-task-bar:hover {
  opacity: 0.9;
  transform: scale(1.02);
  transition: transform 0.1s ease;
}

.gantt-task-bar.dragging {
  opacity: 0.8;
  z-index: 10;
}

/* 任务类型样式 */
.gantt-task-bar.milestone {
  width: 24px !important;
  height: 24px;
  transform: rotate(45deg);
  border-radius: 0;
  background-color: var(--gantt-milestone-color);
  margin-top: 8px;
}

.gantt-task-bar.project {
  height: 18px;
  margin-top: 11px;
  background-color: var(--gantt-project-color);
  border-radius: 0;
}

/* 进度条样式 */
.gantt-task-progress {
  height: 100%;
  background-color: rgba(0, 0, 0, 0.2);
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

/* 拖拽手柄样式 */
.gantt-task-resize-handle {
  position: absolute;
  width: 8px;
  height: 100%;
  top: 0;
  cursor: ew-resize;
}

.gantt-task-resize-handle.left {
  left: 0;
}

.gantt-task-resize-handle.right {
  right: 0;
}

/* 当天线样式 */
.gantt-today-line {
  position: absolute;
  top: 0;
  width: 2px;
  height: 100%;
  background-color: #ff4d4f;
  z-index: 1;
}

/* 依赖线样式 */
.gantt-dependency-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.gantt-dependency-line {
  stroke: var(--gantt-dependency-line-color);
  stroke-width: 2;
  fill: none;
}

/* 虚拟滚动支持 */
.gantt-virtual-scroll .gantt-task-row {
  position: absolute;
  width: 100%;
} 